﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title></title>
    <link href="../CSS/style3.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.showModalDialog.js" type="text/javascript"></script>
    <script type="text/javascript">
        function date2str(date) {
            //null判断
            if (date == null) return "";
            //去掉左右的斜杠
            date = date.replace(/\//g, "");
            //将其转为一个日期对象
            eval("var d = new " + date + ";");
            //返回最终结果
            return d.getFullYear() + "年" + (d.getMonth() + 1) + "月" + d.getDate() + "日";
        }
        $(function () {
            //查询出全部显示，并显示到<table>标签上
            reloadList();
        })
        function reloadList() {
            var id = window.dialogArguments.id;
            $.get("SaleOpen.ashx", { action: "find", id: id }, function (p) {
                //将服务器返回的结果，转为js的数组
                var arr = JSON.parse(p);
                $("#tb1 tr:gt(0)").remove();
                var tb1 = $("#tb1").get(0);
                //加载每一行
                for (var i = 0; i < arr.length; i++) {
                    //添加一行
                    var tr = tb1.insertRow(-1);
                    tr.insertCell(-1).innerHTML = "计划：" + date2str(arr[i].PlanDate) || '';
                    tr.insertCell(-1).innerHTML = "执行：" + date2str(arr[i].PlanResultDate) || '';
                    var tr = tb1.insertRow(-1);
                    tr.insertCell(-1).innerHTML = arr[i].PlanContent || '';
                    tr.insertCell(-1).innerHTML = arr[i].PlanResult ||'';
                }
            });
        };

   </script>
</head>
<body>
    <table class="tableEdit" id="tb1">
        <thead>
            <tr>
                <td colspan="2">开发计划查看（<span style="color:Green">状态：开发成功</span>）</td>
            </tr>
        </thead>
    </table>
    <table class="tableEdit">
        <tr>
            <td colspan="2">
                <input type="button" value="关闭" onclick="window.close()" />
            </td>
        </tr>

    </table>
</body>
</html>